<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8" />
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta content="ie=edge" http-equiv="X-UA-Compatible" />
    <title>注册</title>
    <link href="/Tp5/public/static/admin/img/logo.jpg" rel="shortcut icon" type="image/x-icon">
    <link href="/Tp5/public/static/admin/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/Tp5/public/static/admin/css/font-awesome.min.css" rel="stylesheet" />
    <link href="/Tp5/public/static/admin/css/weather-icons.min.css" rel="stylesheet" />
    <link href="/Tp5/public/static/admin/css/beyond.min.css" id="beyond-link" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="login-container">
    <div class="loginbox bg-white">
        <form>
        <div class="loginbox-title">注册</div>

        <div class="loginbox-or">
            <div class="or-line"></div>
        </div>
        <div class="loginbox-textbox">
            <input class="form-control" name="admin_username" placeholder="请填写用户名" type="text" />
        </div>
        <div class="loginbox-textbox">
            <input class="form-control" name="admin_password" placeholder="请填写密码" type="password" />
        </div>
            <div class="loginbox-textbox">
                <input class="form-control" name="conpass" placeholder="请确认密码" type="password" />
            </div>
            <div class="loginbox-textbox">
                <input class="form-control" name="admin_nickname" placeholder="昵称" type="text" />
            </div>
            <div class="loginbox-textbox">
                <input class="form-control" name="admin_email" placeholder="邮箱" type="email" />
            </div>
           <div class="loginbox-submit">
                <input class="btn btn-primary btn-block" id="register" type="submit" value="注册">
            </div>
        <div class="loginbox-signup">
            <a href="{:url('admin/index/login')}">返回登录</a>
        </div>
        </form>
    </div>
    <div class="logobox">
        <p class="text-center" style="font-size: 18px;font-weight: bold;text-shadow: 3px 3px 3px #FF0000;font-style: italic;">联系QQ:2939754604</p>
    </div>
</div>

<script src="/Tp5/public/static/admin/js/skins.min.js"></script>
<!--Basic Scripts-->
<script src="/Tp5/public/static/admin/js/jquery.min.js"></script>
<script src="/Tp5/public/static/admin/js/bootstrap.min.js"></script>
<script src="/Tp5/public/static/admin/js/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/Tp5/public/static/lib/layer/layer.js"></script>
<!--Beyond Scripts-->
<script src="/Tp5/public/static/admin/js/beyond.js"></script>
<script>
    $(window).bind("load", function () {

        /*Sets Themed Colors Based on Themes*/
        themeprimary = getThemeColorFromCss('themeprimary');
        themesecondary = getThemeColorFromCss('themesecondary');
        themethirdcolor = getThemeColorFromCss('themethirdcolor');
        themefourthcolor = getThemeColorFromCss('themefourthcolor');
        themefifthcolor = getThemeColorFromCss('themefifthcolor');

    });

    $(function () {
       $('#register') .click(function () {
           $.ajax({
               url:"{:url('admin/index/register')}",
               type:'post',
               data:$('form').serialize(),
               dataType:'json',
               success:function (data) {
                   if (data.code == 1){
                       layer.msg(data.msg,{
                           icon:6,
                           time:1200
                       },function () {
                          location.href = data.url;
                          console.log(data.url);
                       });
                   }else {
                       layer.open({
                          title:'注册失败',
                          content:data.msg,
                          icon:5,
                          anim:6
                       });
                   }
               }
           });
           return false;
       });
    });
</script>
</body>
<!--  /Body -->
</html>
